package top.honlnk.czuan.mapper.get;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import top.honlnk.czuan.pojo.dto.add.AddTranslationDTO;
import top.honlnk.czuan.pojo.entity.Translations;
import top.honlnk.czuan.pojo.vo.GetTranslationVO;

import java.util.List;

@Mapper
public interface GetTranslationMapper {
    @Select("select t.id, t.translation, t.part_id, ps.simple AS partSimple, ps.name AS partName from translations t JOIN czuan.part_speech ps ON t.part_id = ps.id where t.translation like concat('%',#{text},'%')")
    List<GetTranslationVO> getTranslationInfo(String text);

    List<Translations> getTranslationInfoOfList(List<AddTranslationDTO> addTranslationDTOList);

    List<GetTranslationVO> getTranslationListInfo(List<Integer> newTranslationIdList);
}
